<template>
  <div class="wrap">
    <el-form :model="form" label-width="150px" label-position="right" style="max-width: 600px">
      <el-form-item label="ID：">
        <el-input v-model="form.id" />
      </el-form-item>

      <el-form-item label="模块名称：">
        <el-input v-model="form.name" />
      </el-form-item>

      <el-form-item label="">
        <el-button type="primary" @click="onSubmit">新增</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>

</template>

<style scoped>
.wrap {
  width: 1000px;
  margin: 0 auto;
}
</style>

<script lang="ts" setup>
import { reactive } from 'vue'

// do not use same name with ref
const form = reactive({
  id: '',
  name: '',
})

const onSubmit = () => {
  console.log('submit!')
}
</script>